//
//  UIColor+arc4random.swift
//  xinlang
//
//  Created by 联创—王增辉 on 2019/3/18.
//  Copyright © 2019年 lcWorld. All rights reserved.
//

import UIKit
extension UIColor {
    class var arcColor: UIColor {
        let red = CGFloat(double_t(arc4random()%255)/255.0);
        let green = CGFloat(double_t(arc4random()%255)/255.0);
        let blue = CGFloat(double_t(arc4random()%255)/255.0);
        return UIColor.init(red:red , green: green, blue: blue, alpha: 1)
    }

    class func Hex(colorHex:Int)->(UIColor){
        let red = colorHex & 0x0000FF
        let green = (colorHex & 0x00FF00) >> 8
        let blue = (colorHex & 0xFF0000) >> 16
        return UIColor.init(red:CGFloat(red)/255.0 , green: CGFloat(green)/255.0, blue: CGFloat(blue)/255.0, alpha: 1)
    }
}
